﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using simpleHotel.Business;
using System.Text;
//using simpleHotel.Data;

namespace simpleHotel.Web.UserControls
{
    public partial class ucNewsEvents : System.Web.UI.UserControl
    {
        EventNews news = new EventNews();
      
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }

        private void LoadData()
        {
            dlNews.DataSource = news.getNews();
            dlNews.DataBind();
        }
    }
}